package org.shilong.MContext.Login;

import org.shilong.MInterface.login.LoginInterface;

public class LoginContext {

	private static LoginInterface LI = null;

	public final static String TYPE_TO_LOGIN = "org.shilong.MImpl.login.LoginImpl";
	
	public final static String TYPE_TO_LOGIN_GET_USER_INFO = "org.shilong.MImpl.login.LoginGetUserInfoImpl";

	public static LoginInterface createInstance( String type ){

		LI = null;

		try {
			LI  = (LoginInterface)Class.forName( type ).newInstance();
		} catch (InstantiationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return  LI;
	}

}
